project(RegisterSo)

SET(CMAKE_CXX_STANDARD 11)

ADD_LIBRARY(rt
    SHARED
    ${CMAKE_SOURCE_DIR}/src/runtime.cpp
    )

ADD_LIBRARY(foo
    SHARED
    ${CMAKE_SOURCE_DIR}/src/foo.cpp)

ADD_LIBRARY(bar
    SHARED
    ${CMAKE_SOURCE_DIR}/src/bar.cpp)

ADD_EXECUTABLE(demo
    ${CMAKE_SOURCE_DIR}/src/demo.cpp)
TARGET_LINK_LIBRARIES(demo bar foo rt)
